\documentclass[11pt]{ctexart}
\usepackage{graphicx}
\usepackage{ctex}
\usepackage{xltxtra}
\usepackage[graphicx]{realboxes}
\usepackage[margin=1in]{geometry}  
\usepackage{amssymb}

\usepackage[a4paper,left=1.25in,right=1.25in,top=1in,bottom=1in]{geometry}

\graphicspath{ {../images/} }
\raggedbottom	% 令页面在垂直方向向顶部对齐
\everymath{\displaystyle}   % 行内公式采用行间公式格式排列
\title{作业报告}
\author{刘小川 \qquad 3210105317}
\begin{document}
\maketitle
\CTEXsetup[format={\Large\bfseries}]{section}

\section{A}
本题程序在maina.m中，运行即可得到对应结果，\par
{
\centering\includegraphics[width=0.9\textwidth]{A.png}

}\par
\section{B}
本题程序在mainb.m中，运行即可得到对应结果，\par
{
\centering\includegraphics[width=0.9\textwidth]{B.png}

}\par
\section{C}
\subsection{1}
证明:由几何级数$\sum_{i=1}^{j}(-1)^{i-1}x^{i-1}=\frac{1 - (-1)^jx^j}{1 + x}$\par
对两边同乘 \((-1)^j\) 可得：
$\frac{x^j}{1+x} = \sum_{i=1}^{j} (-1)^{i+j}x^{i-1} - (-1)^{j+1}\frac{1}{1+x}$

由 \(f(x) = \frac{1}{1+x}\)得：$\int_{0}^{1} \frac{x^j}{1+x} \,dx = \int_{0}^{1} \left( \sum_{i=1}^{j} (-1)^{i+j}x^{i-1} - (-1)^{j+1}\frac{1}{1+x} \right) \,dx$

由于 \((-1)^{i+j}x^{i-1}\) 连续且 \(\sum_{i=1}^{j} (-1)^{i+j}x^{i-1}\) 一致收敛，交换顺序\par$

\int_{0}^{1} \sum_{i=1}^{j
} (-1)^{i+j}x^{i-1} \,dx = \sum_{i=1}^{j} (-1)^{i+j} \int_{0}^{1} x^{i-1} \,dx = \sum_{i=1}^{j} (-1)^{i+j} \frac{1}{i}, \quad i \neq 0
$

另一项为：$
\int_{0}^{1} (-1)^{j+1} \frac{1}{1+x} \,dx = (-1)^{j+1} \ln 2
$

进而：
\[
\int_{0}^{1} \frac{x^j}{1+x} \,dx = (-1)^j \ln 2 + \sum_{i=1}^{j} (-1)^{i+j} \frac{1}{i}, \quad \text{其中} \ , (-1)^j \, \text{和} \, \sum_{i=1}^{j} (-1)^{i+j} \, \text{均为有理数}
\]

因为\(r = r_1 \ln 2 + r_2\) 为 \(\alpha\) 的线性组合，则令\(\alpha = \beta \ln 2 + \gamma\)，即 \(H\beta = r_1, H\gamma = r_2\)。

由于Hilbert矩阵正定可逆，剩下便
都是有理数四则运算的结果，从而公式得证。
\subsection{2,3,4,5}
在matlab下直接运行mainc.m可以直接得到C的所有结果。二三问放在一块完成，同时输出对应$\alpha ,\gamma,\beta$,\par
当n=1时$\alpha = \left ( \begin{matrix}
0.9315 ,\\
-0.4766 \\
\end{matrix} \right )$,
$\gamma = \left ( \begin{matrix}
-6.0000 ,\\
12.0000 \\
\end{matrix} \right )$,
$\beta = \left ( \begin{matrix}
10.0000,\\
-18.0000 \\
\end{matrix} \right )$ \par 
当n=2时$\alpha = \left ( \begin{matrix}
0.9860,\\
-0.8040, \\
0.3274\\
\end{matrix} \right )$,
$\gamma = \left ( \begin{matrix}
-51.0000 ,\\
282.0000, \\
-270.0000\\
\end{matrix} \right )$,
$\beta = \left ( \begin{matrix}
75.0000,\\
-408.0000 ,\\
390.0000\\ 
\end{matrix} \right ) 
\par
当n=3时$\alpha = \left ( \begin{matrix}
0.9973,\\
-0.9389, \\
-0.6646,\\
-0.2248\\
\end{matrix} \right )$,
$\gamma = 1.0e+03*\left ( \begin{matrix}
-0.3567 ,\\
3.9500, \\
-9.4400,\\
6.1133\\
\end{matrix} \right )$,
$\beta = 1.0e+04*\left ( \begin{matrix}
0.0516,\\
-0.5700 ,\\
1.3620,\\
-0.8820\\
\end{matrix} \right )$\par
当n=4时$\alpha = \left ( \begin{matrix}
0.9995,\\
-0.9830,\\
-0.8630, \\
-0.5334,\\
0.1543\\
\end{matrix} \right )$,\par
$\gamma = 1.0e+05*\left ( \begin{matrix}
-0.0236 ,\\
0.4400, \\
-1.8966,\\
2.8646,\\
-1.4017\\
\end{matrix} \right )$,\par
$\beta = 1.0e+05*\left ( \begin{matrix}
0.0340,\\
-0.6348 ,\\
2.7363,\\
-4.1328,\\
2.0223
\end{matrix} \right )$\par
当n=5时$\alpha = \left ( \begin{matrix}
0.9999,\\
-0.9956,\\
0.9513, \\
-0.7689,\\
0.4192,\\
-0.1059\\
\end{matrix} \right )$,\par
$\gamma = 1.0e+06*\left ( \begin{matrix}
-0.0152 ,\\
0.4290, \\
-2.8844,\\
7.4725,\\
-8.2245,\\
3.2337\\
\end{matrix} \right )$,\par
$\beta = 1.0e+07*\left ( \begin{matrix}
0.0022,\\
-0.0619 ,\\
0.4161,\\
-1.0781,\\
1.1865,\\
-0.4665\\
\end{matrix} \right )$\par
当n=6时$\alpha = \left ( \begin{matrix}
1.0000,\\
-0.9989,\\
0.9843, \\
-0.9011,\\
0.6670,\\
-0.3241,\\
0.0727\\
\end{matrix} \right )$,\par
$\gamma = 1.0e+08*\left ( \begin{matrix}
-0.0010 ,\\
0.0383, \\
-0.3690,\\
1.4355,\\
-2.6337,\\
2.2776,\\
-0.7484\\
\end{matrix} \right )$,\par
$\beta = 1.0e+08*\left ( \begin{matrix}
0.0014,\\
-0.0553 ,\\
0.5324,\\
-2.0710,\\
3.7996,\\
-3.2859,\\
1.0798\\
\end{matrix} \right )$\par
对于四五问结果有运行数据截图\par
{
\includegraphics[width=0.3\textwidth]{41.png}

}
{
\includegraphics[width=0.3\textwidth]{42.png}
}
{
\includegraphics[width=0.3\textwidth]{43.png}

}\par
tiknov正则化结果为\par
n=1时 $\alpha =(0.9315,-0.4766)$\par
n=2时 $\alpha =(0.9860,-0.8040,0.3274)$\par
n=3时 $\alpha =(0.9970,-0.9355,0.6564,-0.2195)$\par
n=4时 $\alpha =(0.9937,-0.8747,0.3942,0.1760,-0.1932)$\par
n=5时 $\alpha =(0.9948,-0.8969,0.4908,0.0467,-0.1658,0.0281)$\par
n=6时 $\alpha =(0.9961,-0.9134,0.5133,0.1040,-0.1986,-0.1480,0.1470)$\par
\end{document}
